.class final Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;
.super Ljava/lang/Object;
.source "AppPromoItemView.kt"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->setModel(Llt/farmis/libraries/apps_promo/models/AppPromoModel;Z)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x18
    name = null
.end annotation


# instance fields
.field final synthetic $model:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

.field final synthetic this$0:Llt/farmis/libraries/apps_promo/views/AppPromoItemView;


# direct methods
.method constructor <init>(Llt/farmis/libraries/apps_promo/views/AppPromoItemView;Llt/farmis/libraries/apps_promo/models/AppPromoModel;)V
    .locals 0

    iput-object p1, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;->this$0:Llt/farmis/libraries/apps_promo/views/AppPromoItemView;

    iput-object p2, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;->$model:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/view/View;)V
    .locals 3

    .line 33
    :try_start_0
    iget-object p1, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;->this$0:Llt/farmis/libraries/apps_promo/views/AppPromoItemView;

    invoke-virtual {p1}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;

    move-result-object p1

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;->this$0:Llt/farmis/libraries/apps_promo/views/AppPromoItemView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "market://details?id="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;->$model:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    invoke-virtual {v2}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->access$getViewIntent(Llt/farmis/libraries/apps_promo/views/AppPromoItemView;Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 35
    :catch_0
    iget-object p1, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;->this$0:Llt/farmis/libraries/apps_promo/views/AppPromoItemView;

    invoke-virtual {p1}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;

    move-result-object p1

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;->this$0:Llt/farmis/libraries/apps_promo/views/AppPromoItemView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "https://play.google.com/store/apps/details?id="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Llt/farmis/libraries/apps_promo/views/AppPromoItemView$setModel$1;->$model:Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    invoke-virtual {v2}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Llt/farmis/libraries/apps_promo/views/AppPromoItemView;->access$getViewIntent(Llt/farmis/libraries/apps_promo/views/AppPromoItemView;Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    :goto_0
    return-void
.end method
